package cn.toma.config.authentication;

import org.apache.shiro.SecurityUtils;
import org.apache.shiro.subject.Subject;


/**
 * @author zqx
 * @version 1.0.0
 * @ClassName ShiroUtils.java
 * @Description
 * @createTime 2019年08月26日 10:07:00
 */
public class ShiroUtils
{


	public static Subject getSubjct()
	{
		return SecurityUtils.getSubject();
	}

	public static String getUserName()
	{
		Object object = getSubjct().getPrincipal();
		String username = JWTUtil.getUsername(object.toString());
		return username;
	}


}
